﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class FenxiInput : MonoBehaviour
{
    public Button SaveAndQuit;

    public InputField InputField;

    public string Name;

    void Start()
    {
        InputField.text = PlayerPrefs.GetString(Name);
        Screen.orientation = ScreenOrientation.Portrait;
        SaveAndQuit.onClick.AddListener(delegate
        {
            PlayerPrefs.SetString(Name, InputField.text.ToString());
            GameObject.Find("GameManager").GetComponent<DetailFindText>().Refresh(Name);
            Screen.orientation = ScreenOrientation.LandscapeLeft;
            Destroy(this.gameObject);
        });
    }
}
